<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <head th:include="common :: header"></head>
</head>

<body>
<!--Page content-->
<div id="page-content">
    <div class="row">
        <div class="col-xs-2">
            <div class="panel">
                <div class="panel-heading">
                    <h3 class="panel-title">模块列表</h3>
                </div>
                <div class="panel-body">
                    <div class="list-group bg-trans pad-btm bord-btm" id="moduleList"></div>
                </div>
            </div>
        </div>
        <div class="col-xs-10">
            <div class="panel">
                <div class="panel-heading">
                    <h3 class="panel-title">权限列表</h3>
                </div>
                <div class="panel-body">
                    <div class="pad-btm form-inline">
                        <div class="row">
                            <div id="toolbar">
                                 <span th:each="button: ${buttonList}">
                                    <button th:if="${#strings.containsIgnoreCase(button.perCode,'save')}" class="btn btn-primary freedom-add" th:shiro:hasPermission="${button.perCode}"><i th:class="${button.icon}"></i> [[${button.name}]]</button>
                                    <button th:if="${#strings.containsIgnoreCase(button.perCode,'update')}" class="btn btn-warning freedom-edit" disabled th:shiro:hasPermission="${button.perCode}"><i th:class="${button.icon}"></i> [[${button.name}]]</button>
                                    <button th:if="${#strings.containsIgnoreCase(button.perCode,'remove')}" class="btn btn-danger freedom-delete" disabled th:shiro:hasPermission="${button.perCode}"><i th:class="${button.icon}"></i> [[${button.name}]]</button>
                                 </span>
                                <button id="oc-btn" class="btn btn-success"><i class="fa fa-folder-open-o"></i> 开展/折叠</button>
                            </div>
                        </div>
                    </div>
                    <div class="table-responsive">
                        <table id="treeTable"></table>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<!--End page content-->
<div th:include="common :: script"></div>
<script th:src="@{/business/permission-ui.js}"></script>
<script type="text/javascript" th:inline="javascript" >

    $(function() {
        var prefix = [[${prefix}]];
        var permissions = [[${permissions}]];
        Permission.init(prefix, permissions)
    });

</script>
</body>
</html>
